<p>
  Current user is <%= debug current_user %>
</p>

<%= logged_in? ? link_to('Log out', session_url, :method => :delete) : link_to('Log in', session_url) %>